import { request } from '@/utils/request'

// 查询车辆部件状态列表
export function listCarComponentStatus(query) {
  return request({
    url: '/system/carComponentStatus/list',
    method: 'get',
    params: query
  })
}

// 查询车辆部件状态详细
export function getCarComponentStatus(id) {
  return request({
    url: '/system/carComponentStatus/' + id,
    method: 'get'
  })
}

export function getCarInfo(id) {
  return request({
    url: '/system/carComponentStatus/car/' + id,
    method: 'get'
  })
}

// 新增车辆部件状态
export function addCarComponentStatus(data) {
  return request({
    url: '/system/carComponentStatus',
    method: 'post',
    data: data
  })
}

// 修改车辆部件状态
export function updateCarComponentStatus(data) {
  return request({
    url: '/system/carComponentStatus',
    method: 'put',
    data: data
  })
}

// 删除车辆部件状态
export function delCarComponentStatus(id) {
  return request({
    url: '/system/carComponentStatus/' + id,
    method: 'delete'
  })
}
